tools: Rework linking options for ocaml binding libraries
authorAnthony PERARD <anthony.perard@citrix.com>
Thu, 13 Oct 2022 13:05:13 +0000 (14:05 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 14 Oct 2022 19:56:57 +0000 (20:56 +0100)
commit5310a3aa5026fb27d6834306d920d6207a1e0898
tree9d3ce082042f0df6f72ad5d6a4658b682afb9cf0
parent3f9d53af25dc7f0a9b05e3497822f1eeb47589d9
tools: Rework linking options for ocaml binding libraries

Using a full path to the C libraries when preparing one of the ocaml
binding for those libraries make the binding unusable by external
project. The full path is somehow embedded and reused by the external
project when linking against the binding.

Instead, we will use the proper way to link a library, by using '-l'.
For in-tree build, we also need to provide the search directory via
'-L'.

(The search path -L are still be embedded, but at least that doesn't
prevent the ocaml binding from been used.)

Related-to: xen-project/xen#96
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Christian Lindig <christian.lindig@citrix.com>
Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
tools/Rules.mk
tools/ocaml/libs/eventchn/Makefile
tools/ocaml/libs/xc/Makefile
tools/ocaml/libs/xentoollog/Makefile
tools/ocaml/libs/xl/Makefile